home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / beans / DesignMode.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  2.7 KB  |  91 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)DesignMode.java    1.6 98/09/21
  3.  *
  4.  * Copyright 1997, 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.beans;
  16.  
  17. /**
  18.  * <p>
  19.  * This interface is intended to be implemented by, or delegated from, instances
  20.  * of java.beans.BeanContext, in order to propagate to its nested hierarchy of
  21.  * java.beans.BeanContextChild instances, the current "designTime" property.
  22.  * </p>
  23.  *
  24.  * <p>
  25.  * The JavaBeans specification defines the notion of design time as is a 
  26.  * mode in which JavaBeans instances should function during their composition
  27.  * and customization in a interactive design, composition or construction tool,
  28.  * as opposed to runtime when the JavaBean is part of an applet, application,
  29.  * or other live Java executable abstraction.
  30.  * </p>
  31.  *
  32.  * @author Laurence P. G. Cable
  33.  * @version 1.6
  34.  * @since JDK1.2
  35.  *
  36.  * @see java.beans.BeanContext
  37.  * @see java.beans.BeanContextChild
  38.  * @see java.beans.BeanContextListener
  39.  * @see java.beans.PropertyChangeEvent
  40.  */
  41.  
  42. public interface DesignMode {
  43.  
  44.     /**
  45.      * <p>
  46.      * the standard value of the propertyName as fired from a BeanContext or
  47.      * other source of PropertyChangeEvents.
  48.      * </p>
  49.      */
  50.  
  51.     static String PROPERTYNAME = "designTime";
  52.  
  53.     /**
  54.      * Sets the "value" of the "designTime" property.
  55.      *
  56.      * @param designTime sets the current "value" of the "designTime" property.
  57.      * <p>
  58.      * If the implementing object is an instance of java.beans.BeanContext, or
  59.      * a subinterface thereof, then that BeanContext should fire a
  60.      * PropertyChangeEvent, to its registered BeanContextListeners, with
  61.      * parameters:
  62.      *
  63.      * @param    propertyName    java.beans.DesignMode.PROPERTYNAME
  64.      * @param   oldValue    previous value of "designTime"
  65.      * @param   newValue    current value of "designTime"
  66.      * </p>
  67.      *
  68.      * <p>
  69.      * Note it is illegal for a BeanContextChild to invoke this method
  70.      * associated with a BeanContext that it is nested within.
  71.      * </p>
  72.      *
  73.      * @see java.beans.BeanContext
  74.      * @see java.beans.BeanContextListener
  75.      * @see java.beans.PropertyChangeEvent
  76.      */
  77.  
  78.     void setDesignTime(boolean designTime);
  79.  
  80.     /**
  81.      * <p>
  82.      * A value of true denotes that JavaBeans should behave in design time
  83.      * mode, a value of false denotes runtime behavior.
  84.      * </p>
  85.      *
  86.      * @return the current "value" of the "designTime" property.
  87.      */
  88.  
  89.     boolean isDesignTime();
  90. }
  91.